version: '3.7'

services:
prometheus:
image: prom/prometheus:latest
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
environment:
- SERVICE_1_HOST=localhost
- SERVICE_1_PORT=8081
- SERVICE_2_HOST=localhost
- SERVICE_2_PORT=8082
- SERVICE_3_HOST=localhost
- SERVICE_3_PORT=8083
- SERVICE_4_HOST=localhost
- SERVICE_4_PORT=8084
- SERVICE_5_HOST=localhost
- SERVICE_5_PORT=8085
command:
- '--config.file=/etc/prometheus/prometheus.yml'
ports:
- '9090:9090'

grafana:
image: grafana/grafana:latest
ports:
- '3000:3000'
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
volumes:
- grafana-storage:/var/lib/grafana

volumes:
grafana-storage:
